For live video streaming in a client-server approach, the video stream is downloaded from the streaming server (i.e. source) to the client. A video stream consists of a set of consecutive data pieces that the client periodically requests in order to play the video. A scalable live streaming service requires high streaming server bandwidth to satisfy an increasing number of clients over the internet. In order to reduce the cost of the streaming server, Peer-to-peer (P2P) live streaming has been developed. The basic concept of P2P live streaming is to make the clients, referred to as peers in this context, share the load with the streaming server.
P2P live streaming systems has gained a lot of interest in the recent years as it has the advantage of allowing a streaming source to broadcast e.g. a live video event to a large number of peers, without having to provide all the required bandwidth. This is done by making use of the peers' upload capacity to assist the streaming source in broadcasting the content to the peers.
P2P networks comprise any networks composed of entities that each provides access to a portion of their resources (e.g., processing capacity, disk storage, and/or bandwidth) to other entities. The P2P concept differs from traditional client/server architecture based networks where one or more entities (e.g., computers) are dedicated to serving the others in the network. Typically, entities in a P2P network run similar networking protocols and software. Applications for P2P networks are numerous and may for example comprise transporting and/or storing data on the Internet, such as video distribution for content owners.
Many approaches have been developed to efficiently make use of the upload capacity of the peers. These approaches can be divided into two main categories.
Tree-based systems are based on constructing one or more structured trees in an overlay network where peers at the top of each tree feed the peers below them. This approach works well when the peers do not join or leave the system at high frequency as data flow is achieved without any further messages between the peers. However, in a high churn environment, tree maintenance can be very costly and destruction and reconstruction of the tree(s) are sometimes necessary.
Mesh-based systems do not enforce a tree construction, or in other words; peer connectivity does not form a specified overlay, but the peers are connected to each other in an unstructured manner. They exchange data through so called gossip communication or by sending data request messages to each other. A disadvantage with mesh-based systems is that they can have a long setup time, as nodes need to negotiate with each other to find peers. However, many systems use the mesh-based approach as it is very robust to high churn. In such systems each peer has a number of neighbours that it potentially downloads from and failure of any neighbour is thus not as critical as in tree-based approaches.
Although individual peers take decisions locally without a global view in the mesh-based approaches, they can still reach comparable savings to tree based approaches when peer churn is considered, mainly since they do not have to carry the heavy overhead of maintaining a view of the global connectivity structure.
In P2P networks, peers of a given category may be restricted from distributing data to peers of a certain other category. For instance, firewalls may be a problem and geographic constrains another. A system designer may apply constraints to a P2P network such that a peer in Europe can connect to any other peer in Europe or Russia, but not to a peer in China, whereas a Russian peer could connect either one. Thus, peers are categorized in connectivity groups, which categorization controls to which other peer connectivity groups the peers can connect.
In P2P networks, problems may occur in cases where peers are located behind network address translators making establishing of connections between peers difficult and sometimes even impossible. Network address translation (NAT) allows a network device, such as a router or a firewall, to assign a public address to a group of computers inside a private network such as a local area network (LAN), in order to limit the number of public IP addresses an organization or company must use. Thus, only a single, unique IP address is required to represent the entire group of computers. However, since IP end-to-end connectivity across a network is set aside with the use of NAT, it may not be possible to establish a connection between any two given peers. There are several different NAT types (full-cone, restricted-cone, port-restricted, symmetric, etc.), some being compatible for communication with each other, while others are not. There are several methods for enabling NAT restricted peers to establish a connection, such as e.g. STUN, TURN and ICE. However, these methods are not always guaranteed to work and their effectiveness at establishing a connection between any two given NAT types can be expressed probabilistically. To conclude, this restriction ultimately results in reduced bandwidth savings on the streaming server.